<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>
			Pomelo
		</title>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<meta http-equiv="content-style-type" content="text/css" />
		<meta http-equiv="content-scripte-type" content="text/javascript" />
		<meta name="author" content="netease" />
		<meta name="version" content="1.0" />
		<meta name="keywords" content="pomelo" />
		<link type="text/css" rel="stylesheet" href="css/base.css" />
		<script src="js/lib/build/build.js" type="text/javascript"></script>
		<script src="js/jquery-3.6.0.min.js"></script>
		<script type="text/javascript">
			require('boot');
		</script>
		<script type="text/javascript">
			var pomelo = window.pomelo;
			var host = "dfer.top";
			var port = "3010";

			function show() {
				pomelo.init({
					host: host,
					port: port,
					log: true
				}, function() {
					pomelo.request("connector.entryHandler.entry", "hello pomelo", function(data) {
						// alert(data.msg);
						$('#msg').html(data.msg)
					});
				});
			}
			
			function publish(){
				pomelo.request("connector.entryHandler.publish", "hello publish", function(data) {
				$('#msg').html(data.msg)
				});
			}
			function subscribe(){
				pomelo.request("connector.entryHandler.subscribe", "hello subscribe", function(data) {
				$('#msg').html(data.msg)
				});
			}
		</script>
	</head>
	<body>
		<div class="g-doc">
			<div class="g-banner" style="border:none">
				<div class="logo">
					<div class="img"></div>
				</div>
			</div>
			<div class="g-background">
				<div class="g-content" id="msg">
					Welcome to Pomelo
				</div>
			</div>
			<div class="g-button">
				<table>
					<tr>
						<td><input id="test" type="button" value="entry" onclick="show()" /></td>
						<td><input id="test" type="button" value="publish" onclick="publish()" /></td>
						<td><input id="test" type="button" value="subscribe" onclick="subscribe()" /></td>
					</tr>
				</table>
			</div>
		</div>
	</body>
</html>
